home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / By the Book / Mac Pascal Primer, 4.0 / Chap 3, Hello2 ƒ / Hello2.p next >
Text File  |  1990-07-06  |  517b  |  28 lines

  1. program Hello2;
  2.     const
  3.         BASE_RES_ID = 400;
  4.         HORIZONTAL_PIXEL = 30;
  5.         VERTICAL_PIXEL = 50;
  6.  
  7.  
  8. {-------------------------------->    WindowInit    <---}
  9.  
  10.     procedure WindowInit;
  11.         var
  12.             helloWindow: WindowPtr;
  13.     begin
  14.         helloWindow := GetNewWindow(BASE_RES_ID, nil, WindowPtr(-1));
  15.         ShowWindow(helloWindow);
  16.         SetPort(helloWindow);
  17.         MoveTo(HORIZONTAL_PIXEL, VERTICAL_PIXEL);
  18.         DrawString('Hello, world!');
  19.     end;
  20.  
  21.  
  22. {-------------------------------->    Hello2    <---}
  23. begin
  24.     WindowInit;
  25.     while (not Button) do
  26.         begin
  27.         end;
  28. end.